package com.klod.data.mapping


import org.jetbrains.exposed.sql.ResultRow
import org.jetbrains.exposed.sql.Table

//0没有类型 1 科技 2财经 3娱乐 4体育
data class NewsTypeBean(
    var id: Int,
    var name: String,
)

object NewsTypeTable : Table("news_news_type") {

    val id = integer("id").autoIncrement()
    val name = text("name")


    override val primaryKey = PrimaryKey(id)
}

fun daoToNewsTypeModel(dao: ResultRow) =  NewsTypeBean(
    id = dao[NewsTypeTable.id],
    name =  dao[NewsTypeTable.name],

)